<?php 

class RenalbumsCtl extends BaseCtl {
	public function RenalbumsCtl(){
		parent::BaseCtl();
	}
	
    public function isPostback(){
    	return 'renalbums' == $this->getPost('pagename');
    }

    public function loadData(){
    	// there are no fields on the page to be loaded
    }
    
    public function renumber(){
    	try {
    		$id = HtmlUtil::getSessionUser()->getUser()->getId();
    		
    		$service = new Service();
    		$service->renumberAlbums($id);
    		
    		HtmlUtil::addMessage('The albums have been renumbered successfully');
    	}
    	catch(Exception $e){
    		HtmlUtil::addError($e->getMessage());
    	}
    }
	
}

?>